﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Spore.Utils
{
    [Serializable]
   public class Dto
    {
        public  int DataID
        {
            get;
            set;
        }

       public object RealData
        {
            get;
            set;
        }

        public Dto(int dataID,object data,NetClient nclient)
        {
            this.DataID = dataID;
            this.RealData = data;
            this.Channel = nclient;
        }

        public NetClient Channel
        {
            get;
            private set;
        }

        public T ConvertData<T>()
        {
            return (T)RealData;
        }

        public Dto()
        {
 
        }
    }
}
